package com.itzhoun.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author 周楠
 * @Date 2022/09/11/上午 12:30
 */
@Component
public class WorkReceiver {

    @RabbitListener(queues = "work")
    public void receiver1(String message){
        System.out.println("消费者1:" + message);
    }

    @RabbitListener(queues = "work")
    public void receiver2(String message){
        System.out.println("消费者2:" + message);
    }
}
